#include <assert.h>
#include "organizationdao_factory.h"
#include "organizationdao_stub4web.h"
#include "organizationdao_stub4app.h"
//#include "organizationdao.h"

using namespace erp::organization::dao;

bool COrganizationDaoFactory::s_OrganizationDaoInit = false;

IOrganizationDao* COrganizationDaoFactory::GetObject(enum ObjType_T obj_type)
{
    switch(obj_type)
    {
    case STUB4APP:
        return (new COrganizationDaoStub4App);
/*适应container3
    case POCO:
    {
        if(!s_OrganizationDaoInit)
        {
            int iRetCode = COrganizationDao::Initialize();
            assert(iRetCode == 0);
            s_OrganizationDaoInit = true;
        }   	
        return (new COrganizationDao);
	}*/
    default:
        assert(0);
    };
    return NULL;
}

IOrganizationDaoAsyc* COrganizationDaoFactory::GetAsycObject()
{
	return (new COrganizationDaoStub4App);
}
